<html>
<head><meta charset="utf-8"><title>meeting 2021-04-28 · t-libs/meetings · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/index.html">t-libs/meetings</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html">meeting 2021-04-28</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="236538993"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236538993" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236538993">(Apr 28 2021 at 16:35)</a>:</h4>
<p>hey <span class="user-group-mention" data-user-group-id="2645">@T-libs</span>! we have a meeting in a few hours at <time datetime="2021-04-28T19:00:00Z">2021-04-28T21:00:00+02:00</time>.</p>
<p>preliminary agenda: <a href="https://hackmd.io/YMXFwXatT--IwP4D9npMgA">https://hackmd.io/YMXFwXatT--IwP4D9npMgA</a></p>
<p>we'll be discussing <a href="https://github.com/rust-lang/rust/issues/84266">#84266</a> (<code>feature = "global-oom-handling"</code>), so it'd be useful to read that thread for context if you haven't already done so ^^</p>



<a name="236539087"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236539087" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236539087">(Apr 28 2021 at 16:36)</a>:</h4>
<p>cc <span class="user-mention" data-user-id="116122">@simulacrum</span> - i believe you were interested in joining this meeting</p>



<a name="236539101"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236539101" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236539101">(Apr 28 2021 at 16:36)</a>:</h4>
<p>yep it's on my calendar</p>



<a name="236539149"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236539149" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236539149">(Apr 28 2021 at 16:36)</a>:</h4>
<p>thanks for the reminder :)</p>



<a name="236540010"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236540010" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> John Ericson <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236540010">(Apr 28 2021 at 16:42)</a>:</h4>
<p>Does the meeting just take place over chat?</p>



<a name="236540066"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236540066" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236540066">(Apr 28 2021 at 16:43)</a>:</h4>
<p>No, it's done via video</p>



<a name="236540129"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236540129" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> John Ericson <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236540129">(Apr 28 2021 at 16:43)</a>:</h4>
<p>Is there a link I'm missing? Sorry if I'm being daft. (I also don't know if they are public.)</p>



<a name="236540646"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236540646" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jakub Duchniewicz <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236540646">(Apr 28 2021 at 16:46)</a>:</h4>
<p>same here, <span class="user-mention" data-user-id="220273">@Jane Lusby</span>  told me there will be some discussion of the <code>Termination</code> trait so I would like to join</p>



<a name="236543989"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236543989" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236543989">(Apr 28 2021 at 17:10)</a>:</h4>
<p><span class="user-mention" data-user-id="310399">@Mara</span> I'm familiar with that proposal, and I've been working with the Rust-in-Linux folks who motivated it.</p>



<a name="236544108"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236544108" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236544108">(Apr 28 2021 at 17:10)</a>:</h4>
<p>perfect :)</p>



<a name="236544129"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236544129" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236544129">(Apr 28 2021 at 17:10)</a>:</h4>
<p>We should talk not just about that proposal, but about the general solution we want for the underlying problem.</p>



<a name="236544163"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236544163" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236544163">(Apr 28 2021 at 17:11)</a>:</h4>
<p>sounds good. feel free to edit the agenda</p>



<a name="236544417"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236544417" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236544417">(Apr 28 2021 at 17:12)</a>:</h4>
<p>For instance, in the past we considered adding <code>try_*</code> variants of all the <code>Vec</code> methods that might allocate, but we decided not to, in favor  of <em>just</em> having <code>try_reserve</code>. I think we may want to revisit that decision.</p>



<a name="236544537"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236544537" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> The 8472 <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236544537">(Apr 28 2021 at 17:13)</a>:</h4>
<p>Hah. I thought those were just never implemented.</p>



<a name="236544539"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236544539" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236544539">(Apr 28 2021 at 17:13)</a>:</h4>
<p>there was also some conflicting idea of having a <code>try_push</code> (etc.) that doesn't even attempt to allocate, but just refuses if there's no capacity.</p>



<a name="236544628"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236544628" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236544628">(Apr 28 2021 at 17:14)</a>:</h4>
<p>That's another possibility, absolutely.</p>



<a name="236544663"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236544663" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236544663">(Apr 28 2021 at 17:14)</a>:</h4>
<p>I think those two possibilities could be done with one API.</p>



<a name="236544768"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236544768" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236544768">(Apr 28 2021 at 17:15)</a>:</h4>
<p>If we have them return an appropriate <code>Result&lt;_, VecError&gt;</code>, that error could either be an allocation error or a would-need-to-alloc-and-won't error.</p>



<a name="236544902"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236544902" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> The 8472 <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236544902">(Apr 28 2021 at 17:16)</a>:</h4>
<p>But there also are open questions around allocator error types</p>



<a name="236544947"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236544947" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236544947">(Apr 28 2021 at 17:16)</a>:</h4>
<p>And then which one could be determined either by the Vec at runtime (e.g. a way to put a Vec in "fallible-only mode"), or by a compile-time feature or similar.</p>



<a name="236544978"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236544978" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> The 8472 <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236544978">(Apr 28 2021 at 17:16)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/issues/48043">#48043</a></p>



<a name="236544983"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236544983" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236544983">(Apr 28 2021 at 17:16)</a>:</h4>
<p><span class="user-mention" data-user-id="330154">@The 8472</span> We could make the <code>VecError</code> opaque in that regard.</p>



<a name="236545001"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236545001" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236545001">(Apr 28 2021 at 17:16)</a>:</h4>
<p><code>vec.try_push(1).or_if_that_didnt_fit_try_allocating_maybe().and_if_that_doesnt_work_just_panic()</code></p>



<a name="236545045"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236545045" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> The 8472 <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236545045">(Apr 28 2021 at 17:17)</a>:</h4>
<p>Yeah, I also suggested making the allocator error opaque for now so we can stabilize <code>try_reserve</code> and make it concrete later.</p>



<a name="236545220"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236545220" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> The 8472 <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236545220">(Apr 28 2021 at 17:18)</a>:</h4>
<p>Not sure if that's actually possible. Could it lead to inference problems or something if we turn an <code>impl Error</code> into <code>Self::Alloc::AllocError</code> later?</p>



<a name="236545271"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236545271" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236545271">(Apr 28 2021 at 17:18)</a>:</h4>
<p><span class="user-mention" data-user-id="310399">@Mara</span> &lt;sarcasm level="extreme"&gt;Clearly we just need <code>call/cc</code>-style continuations, and <code>try_push</code> could return a continuation you could call back into with more memory.&lt;/sarcasm&gt;</p>



<a name="236545322"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236545322" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236545322">(Apr 28 2021 at 17:18)</a>:</h4>
<p>sounds great!</p>



<a name="236545397"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236545397" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236545397">(Apr 28 2021 at 17:19)</a>:</h4>
<p><span class="user-mention" data-user-id="330154">@The 8472</span> I was more thinking we could return an opaque <code>VecError</code> whose internals weren't visible (and don't need to become visible let alone stabilized on the same schedule as the <code>try_</code> methods returning that error).</p>



<a name="236545473"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236545473" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> The 8472 <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236545473">(Apr 28 2021 at 17:19)</a>:</h4>
<p>Well, that would only solve part of the problem since the effort will need <code>try_reserve</code> too anyway</p>



<a name="236545479"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236545479" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236545479">(Apr 28 2021 at 17:19)</a>:</h4>
<p>(Or it doesn't have to be a <code>VecError</code>, it could be an opaque <code>CollectionMemoryError</code> or something.)</p>



<a name="236545792"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236545792" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236545792">(Apr 28 2021 at 17:21)</a>:</h4>
<p><span class="user-mention" data-user-id="330154">@The 8472</span> Since <code>try_reserve</code> isn't stable yet, we could either have it return the same opaque <code>CollectionMemoryError</code>, or a separate opaque <code>TryReserveError</code>, and either way hide the internals. We could optionally add a method <code>fn get_alloc_error() -&gt; Option&lt;AllocError&gt;</code>, while still leaving the error type extensible.</p>



<a name="236545894"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236545894" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236545894">(Apr 28 2021 at 17:22)</a>:</h4>
<p><span class="user-mention" data-user-id="344196">@Jakub Duchniewicz</span> we need to put the termination trait issue on the agenda, I'm not sure if you can edit the agenda to do so, if not I can when I get back home (on a walk atm)</p>



<a name="236546080"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236546080" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236546080">(Apr 28 2021 at 17:23)</a>:</h4>
<p>you should be able to edit, if you log in with github or something</p>



<a name="236546722"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236546722" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> The 8472 <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236546722">(Apr 28 2021 at 17:28)</a>:</h4>
<p>Some other suggestions from that PR:</p>
<ul>
<li>extract fallible subset to a <code>fallible_alloc</code> crate from which <code>alloc</code> imports and adds infallible methods on top (seems tricky with split impls)</li>
<li>separate modules or impl blocks to reduce <code>cfg</code> spam and clearer separation/easier review of fallible vs. infallible code. still could lead to frustrating late errors in the build process</li>
<li>only implement <code>try_</code> methods (the PR seems to assume this will happen eventually) and ask the kernel devs to check that no panics are in the build output via some lint/other post-build checks (not sure if they'd be ok with that)</li>
<li>use <code>#[cfg(not(target_env = "kernel"))]</code> instead to prototype it for linux only. avoids the <code>std</code> cargo feature problem but limits who can benefit from this</li>
<li>reduce some of the <code>cfg</code> spam via conditional <code>allow(unused)</code></li>
</ul>



<a name="236547399"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236547399" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jakub Duchniewicz <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236547399">(Apr 28 2021 at 17:32)</a>:</h4>
<p>added the <code>Termination</code> discussion point to the agenda</p>



<a name="236547430"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236547430" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> The 8472 <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236547430">(Apr 28 2021 at 17:32)</a>:</h4>
<p><span class="user-mention" data-user-id="239881">@Josh Triplett</span> a collection error could make sense but the <code>Option</code> for <code>AllocError</code> still seems a bit strange. That's why I was asking whether just hiding it behind <code>impl Error</code> today and revealing it later would be possible, then we wouldn't have to carry the always-Some or always-None Option into the future.</p>



<a name="236547535"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236547535" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236547535">(Apr 28 2021 at 17:33)</a>:</h4>
<p><span class="user-mention" data-user-id="330154">@The 8472</span> We wouldn't need to do that right away, just if people need access to the AllocError.</p>



<a name="236547714"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236547714" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236547714">(Apr 28 2021 at 17:34)</a>:</h4>
<p><span class="user-mention" data-user-id="330154">@The 8472</span> Another possibility the Linux kernel team discussed is running a Rust-equivalent of <code>unifdef</code> over alloc that strips out code based on a <code>cfg</code>, which may be easier than using build-std and a feature flag.</p>



<a name="236547724"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236547724" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> The 8472 <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236547724">(Apr 28 2021 at 17:34)</a>:</h4>
<p>mhh, if it's an enum we could add it as variant later.</p>



<a name="236547787"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236547787" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236547787">(Apr 28 2021 at 17:35)</a>:</h4>
<p>True, iff the enum is not exhaustive.</p>



<a name="236547833"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236547833" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236547833">(Apr 28 2021 at 17:35)</a>:</h4>
<p>The idea of <code>cfg(not(target_env="kernel"))</code> is appealing as well, since that would Just Work, and the kernel target is experimental anyway.</p>



<a name="236547886"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236547886" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236547886">(Apr 28 2021 at 17:35)</a>:</h4>
<p>But that said, I think it'd be preferable to have a safelist of APIs, not a blocklist of APIs.</p>



<a name="236547969"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236547969" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236547969">(Apr 28 2021 at 17:36)</a>:</h4>
<p>As in, rather than blocklisting <code>push</code> in favor of <code>try_push</code>, we should <em>only</em> expose a safelisted subset of alloc, which we could add to incrementally.</p>



<a name="236548101"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236548101" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> The 8472 <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236548101">(Apr 28 2021 at 17:37)</a>:</h4>
<p>but there currently is no mechanism for that</p>



<a name="236548320"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236548320" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236548320">(Apr 28 2021 at 17:38)</a>:</h4>
<p>True, but there could be, as part of the proposal.</p>



<a name="236548386"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236548386" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236548386">(Apr 28 2021 at 17:39)</a>:</h4>
<p>That would make it possible to use unmodified alloc and just compile it with a specific option, rather than having to have a custom alloc.</p>



<a name="236548436"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236548436" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> The 8472 <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236548436">(Apr 28 2021 at 17:39)</a>:</h4>
<p>And with a safelist there's the issue that someone could accidentally add infallible allocation to some implementation later that didn't allocate before. So the safelist would have to be verified somehow. Which kind of looks like the "and ask the kernel devs to check that no panics are in the build output via some lint/other post-build checks" approach.</p>



<a name="236548913"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236548913" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236548913">(Apr 28 2021 at 17:42)</a>:</h4>
<p>I'm sorry I'm a little confused, what is it that's problematic about having an opaque struct as the error type with a minimal public interface to start?</p>



<a name="236548955"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236548955" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236548955">(Apr 28 2021 at 17:43)</a>:</h4>
<p>I don't quite understand what you meant by the Optional error</p>



<a name="236549031"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236549031" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236549031">(Apr 28 2021 at 17:43)</a>:</h4>
<p>Oh that's a method that josh suggested adding to the error type to expose some details conditionally</p>



<a name="236549146"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236549146" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236549146">(Apr 28 2021 at 17:44)</a>:</h4>
<p>I don't see how using an existential type buys us anything over a new struct with private internals</p>



<a name="236549171"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236549171" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236549171">(Apr 28 2021 at 17:44)</a>:</h4>
<p>The only difference is we're commiting to a name for the type</p>



<a name="236549265"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236549265" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236549265">(Apr 28 2021 at 17:45)</a>:</h4>
<p>But otherwise they commit to identical APIs, excluding the mentioned potential get_alloc_error method</p>



<a name="236549384"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236549384" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> The 8472 <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236549384">(Apr 28 2021 at 17:45)</a>:</h4>
<p>The original concern was whether <code>try_reserve</code> would return <code>AllocError</code> directly and that the allocator error story isn't settled yet (associated type or not). Which could of course be solved by adding another Error type that describes collection allocation failures which may or may not return allocator error types later.</p>



<a name="236549620"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236549620" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236549620">(Apr 28 2021 at 17:47)</a>:</h4>
<p>Aah, I see</p>



<a name="236549822"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236549822" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236549822">(Apr 28 2021 at 17:48)</a>:</h4>
<p>I definitely lean towards Josh's suggestion of a new type</p>



<a name="236550469"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236550469" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> The 8472 <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236550469">(Apr 28 2021 at 17:52)</a>:</h4>
<p>The safe list seems like a poor man's effects system :D</p>



<a name="236550893"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236550893" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236550893">(Apr 28 2021 at 17:55)</a>:</h4>
<p>So, the kernel <em>isn't</em> looking to omit all panics. It needs to not panic for allocation failure.</p>



<a name="236550980"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236550980" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236550980">(Apr 28 2021 at 17:56)</a>:</h4>
<p>It's still OK to panic (which in the kernel may be an "oops") for something like an indexing failure, or similar assertion.</p>



<a name="236551004"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236551004" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236551004">(Apr 28 2021 at 17:56)</a>:</h4>
<p>It just has to be an unrecoverable error.</p>



<a name="236551797"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236551797" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> The 8472 <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236551797">(Apr 28 2021 at 18:01)</a>:</h4>
<p>Hrm, that also makes it more difficult to verify. I guess we could write codegen checks that fail if there's a call to the panic function  inside RawVec or into the OOM handler but other panic calls, e.g. from asserts, might be ok?</p>



<a name="236553140"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236553140" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> The 8472 <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236553140">(Apr 28 2021 at 18:10)</a>:</h4>
<p>One issue is that they want something they can use soon(ish) and may have to fork alloc in the meantime. So the question is whether we want some unstable, preliminary thing in alloc now or block on a cleaner design.</p>



<a name="236554218"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236554218" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236554218">(Apr 28 2021 at 18:17)</a>:</h4>
<p>I don't think we should <em>rush</em> the design. But if we see a path to the right design we should head in that direction.</p>



<a name="236554275"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236554275" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236554275">(Apr 28 2021 at 18:17)</a>:</h4>
<p>I think having <code>try_</code> versions of functions that currently panic on allocation failure would be a good idea, and not <em>too</em> painful in terms of duplication (since all the non-try versions can just call the try version and panic).</p>



<a name="236554972"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236554972" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236554972">(Apr 28 2021 at 18:23)</a>:</h4>
<p>I think that is pretty bad from a user perspective and difficult to pull off (I guess maybe for vec not so much)</p>



<a name="236555389"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236555389" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236555389">(Apr 28 2021 at 18:26)</a>:</h4>
<p>It's also a solution that eliminates use of e.g. collect() or so, though that might be unavoidable, not sure. I personally lean towards a separate "fallible" type/crate which the infallible types can wrap; that lets you have nice names and avoid duplicating API surface. We can support changing from one type to another pretty seamlessly I suspect.</p>



<a name="236557784"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236557784" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236557784">(Apr 28 2021 at 18:43)</a>:</h4>
<p>Certainly for reading the docs it'd be nice to not have a huge <code>try_*</code> section with nearly everything repeated.  Could even be nice to catch accidental "oops I typed <code>push</code> even though I'm not supposed to be allocation-panicking here" by opting in to "nope this is supposed to be checking everything" at the container type level.</p>
<p>(Since yeah, we could definitely From/Into for super-cheap between them.)</p>



<a name="236558013"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236558013" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> The 8472 <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236558013">(Apr 28 2021 at 18:45)</a>:</h4>
<p>Well, there's <code>slice::into_vec</code> and the stable sort implementation. The former could be be replaced by some vec::try_extend or whatever. And I guess the kernel uses unstable sort?</p>



<a name="236558327"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236558327" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236558327">(Apr 28 2021 at 18:47)</a>:</h4>
<p>Ah, the deref to things on slice is a good point.</p>



<a name="236558637"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236558637" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> The 8472 <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236558637">(Apr 28 2021 at 18:49)</a>:</h4>
<p>most of slice is in core, only a handful of methods live in alloc</p>



<a name="236558689"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236558689" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236558689">(Apr 28 2021 at 18:49)</a>:</h4>
<p>We can "hide" the slice impls with inherent methods, potentially, but it's pretty easy to get a slice directly. I think to some extent slice allocation is sufficiently unusual to use in practice it's no big deal to hide them entirely perhaps via cfg.</p>



<a name="236560273"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236560273" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236560273">(Apr 28 2021 at 18:59)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> Collect is still possible, it would just require a fallible interface.</p>



<a name="236560539"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236560539" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236560539">(Apr 28 2021 at 19:01)</a>:</h4>
<p><span class="user-group-mention" data-user-group-id="2645">@T-libs</span> meeting time <span aria-label="sparkles" class="emoji emoji-2728" role="img" title="sparkles">:sparkles:</span></p>



<a name="236560550"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236560550" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236560550">(Apr 28 2021 at 19:01)</a>:</h4>
<p>Not trying to dispute that. I'm saying that try_ doesn't fully solve the problem (there are functions that don't fit that pattern, particularly around existing traits), and there may be alternatives that help avoid some of the pain of having 2x number of methods etc.</p>



<a name="236560642"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236560642" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236560642">(Apr 28 2021 at 19:01)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> I think part of the issue would be whether a solution avoiding the duplicate methods would be as usable.</p>



<a name="236560748"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236560748" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236560748">(Apr 28 2021 at 19:02)</a>:</h4>
<p>For instance, we could avoid the duplicate methods by having everything return an associated error type and making that error type be <code>!</code>, but that'd be a pain.</p>



<a name="236560891"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236560891" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236560891">(Apr 28 2021 at 19:03)</a>:</h4>
<p><span class="user-mention" data-user-id="330154">@The 8472</span> are you planning on joining the meeting / do you need the meeting link?</p>



<a name="236561187"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236561187" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> The 8472 <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236561187">(Apr 28 2021 at 19:05)</a>:</h4>
<p>Don't have a mic, but I could listen in. Need a link.</p>



<a name="236562906"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236562906" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Simon Sapin <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236562906">(Apr 28 2021 at 19:16)</a>:</h4>
<p><span class="user-mention silent" data-user-id="239881">Josh Triplett</span> <a href="#narrow/stream/259402-t-libs.2Fmeetings/topic/meeting.202021-04-28/near/236544417">said</a>:</p>
<blockquote>
<p>we considered adding <code>try_*</code> variants of all the <code>Vec</code> methods that might allocate, but we decided not to, in favor  of <em>just</em> having <code>try_reserve</code>.</p>
</blockquote>
<p>I’m pretty sure that was only bikeshed avoidance. Having a first RFC doing only the bare minimum, leaving the rest of the design for later.</p>



<a name="236569398"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236569398" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236569398">(Apr 28 2021 at 20:03)</a>:</h4>
<p><span class="user-mention" data-user-id="219747">@Simon Sapin</span> Thanks, that insight really helps.</p>



<a name="236569557"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236569557" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Simon Sapin <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236569557">(Apr 28 2021 at 20:04)</a>:</h4>
<p>The RFC itself has a bunch to say: <a href="https://rust-lang.github.io/rfcs/2116-alloc-me-maybe.html#future-work-complete-result-apis">https://rust-lang.github.io/rfcs/2116-alloc-me-maybe.html#future-work-complete-result-apis</a></p>



<a name="236570412"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236570412" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> The 8472 <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236570412">(Apr 28 2021 at 20:10)</a>:</h4>
<p>One complication with "Vec is a wrapper around FallibleVec"... what if you have <code>&amp;mut FallibleVec</code>?</p>



<a name="236570916"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236570916" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236570916">(Apr 28 2021 at 20:14)</a>:</h4>
<p>What complication is that? We can provide a &amp;mut FallibleVec -&gt; &amp;mut Vec so long as Vec is repr(transparent) of FallibleVec, which I would definitely expect to be the case.</p>



<a name="236571335"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/259402-t-libs/meetings/topic/meeting%202021-04-28/near/236571335" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> The 8472 <a href="https://rust-lang.github.io/zulip_archive/stream/259402-t-libs/meetings/topic/meeting.202021-04-28.html#236571335">(Apr 28 2021 at 20:16)</a>:</h4>
<p>right. forget I said anything <span aria-label="sweat" class="emoji emoji-1f613" role="img" title="sweat">:sweat:</span></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>